1. Field of the Invention
The present invention relates to a device and a method for carrying out appearance inspection of an object having a line pattern, and in particular, relates an appearance inspection device and an appearance inspection method, wherein the object is captured by a camera and it is judged as to whether an appearance of the object is good or not by using obtained image data of the object.
2. Description of the Related Art
In the prior art, in an assembly process of various components, a state of a sealing agent or adhesive is usually inspected after the agent or adhesive is applied to a surface of a component to be bonded. This inspection may be carried out by an operator visually, or by an inspection device having an image processing function. As a factor to be inspected, color, brightness, an area and/or a width of the applied adhesive may be evaluated. If the inspection is carried out by using an image, when the brightness or the width of a specified portion should be inspected, an inspection region surrounding the portion may be determined. In this case, it is not difficult to teach the factor to be inspected to the inspection device.
However, the sealing agent or adhesive is applied to the component in various shapes (in many cases, in an elongated line pattern) corresponding to a shape of the component, it is difficult to teach where in the sealing agent should be inspected and how the sealing agent should be inspected. Even when the shape of a portion to be inspected can be taught, it may be difficult to teach how the portion should be inspected. In addition, when a teaching method is specified as a particular inspection (for example, an inspection of the width), it is often difficult to carry out another inspection (for example, an inspection of the brightness).
As an inspection of a line pattern such as a sealing agent, etc., by using image processing, there are some well-known techniques. For example, JP 2010-054289A discloses a method for judging continuity of a line pattern, wherein the line pattern is captured; a captured image is digitalized so as to separate the line pattern from the other region and detect a profile of the line pattern; and the profile is traced by determining an edge point positioned at one end of both ends within an inspection object range, as a start point.
JP H08-334478 A discloses a seal inspection system having a specification function for inspecting the position of an image of an inspection width portion corresponding to a seal application position; and a function for judging the positions of two pixels where a change in concentration exceeds a set value, among pixels from both end positions to an inspection position in relation to an inspection width in image data, as both ends (or edges) of the sealing agent in the width direction thereof.
JP H11-037724 A discloses a method including: approximating a captured image of a sealing agent by a polygonal line; dividing the sealing agent into a plurality of portions based on a coordinate of each edge of the polygonal line; providing windows to the divided portions; and detecting the width and position of the seal portions within each window.
It may be difficult to apply the method in JP 2010-054289 A to a case wherein a contrast between the line pattern and a background thereof is not clear. On the other hand, in the method of JP H08-334478 A, since both the brightness and the width of the sealing agent cannot be simultaneously inspected at the inspection point, even the sealing agent offset from a predetermined position may be judged as “success.” Further, JP H08-334478 does not describe a method for setting the inspection point.
In the method of JP H11-037724 A, in fact, success/failure of the inspection depends on whether a line pattern is correctly extracted from an image and is approximate by a polygonal line. Therefore, depending on an object to be inspected, it may be impossible to inspect the object, or inspection criteria may be varied. Further, the calculation for extracting the line pattern and approximating it by a polygonal line is costly and takes a lot of time. In addition, JP H11-037724 does not describe a case wherein a line pattern of an object to be inspected includes a branch point, and thus the method of this document is difficult to be applied to a line pattern having an arbitrary shape.